<template>
  <div>
    <el-container>
      <el-header>
        <el-row>
          <el-col :span="12" style="text-align: left">
            <span>智慧航空信息服务平台</span>
          </el-col>
          <el-col :span="12" style="text-align: right">
            <el-button style="text-align: right" @click="logout">退出登录</el-button>
          </el-col>
        </el-row>


      </el-header>


      <el-menu class="el-menu-demo"
               default-active="this.$router.path"
               mode="horizontal"
               router>
        <el-menu-item index="/user_index/u_index">首页</el-menu-item>
        <el-menu-item index="/user_index/u_news">热点关注</el-menu-item>
        <el-menu-item index="/user_index/u_company">航空公司</el-menu-item>
        <el-menu-item index="/user_index/u_tourism">旅游信息</el-menu-item>
      </el-menu>
      <el-main>
        <router-view/>
      </el-main>
    </el-container>

  </div>
</template>

<script>
import router from "@/router";

export default {
  name: "user_index",
  data() {
    return {}
  },
  created() {
  },
  methods: {
    logout() {
      window.sessionStorage.removeItem("token");
      router.push('/');
    }
  }

}
</script>

<style scoped>
.el-header {
  background-color: skyblue;
  color: #333;
  text-align: center;
  font-size: 40px;
  color: aliceblue;
  font-family: 华文行楷;
  text-align: left;
  line-height: 60px;
}
</style>